#ifndef STATUS_TYPE_DATA_H
#define STATUS_TYPE_DATA_H

#include <QString>
#include <QVariant>

#include "statustypegroup.h"
#include "statustype.h"

/**
 * This class contains extended information about StatusType enums.
 *
 * StatusTypeData instances can be only aquired by StatusTypeManager methods.
 * Use instances of this class to get additional info like status type name, display name, icon or type group.
 */
class StatusTypeData
{
public:
    StatusTypeData();
    StatusTypeData(const StatusTypeData &copyMe);

    /**
     * Returns StatusType enum value associated with this object.
     */
    StatusType type() const {
        return m_type;
    }

    /**
     * Returns name of status type associated with this object. This name can be used to store
     * status type in configuration files. StatusTypeData can be restored from name using
     * StatusTypeManager::byName method.
     */
    inline const QString & name() const {
        return m_name;
    }

    /**
     * Returns display name of status type associated with this object.
     */
    inline const QString & displayName() const {
        return m_displayName;
    }

    /**
     * Returns icon name associated with this status type.
     */
    inline const QString & iconName() const {
        return m_iconName;
    }

    /**
     * Returns StatusTypeGroup enum value associated with this status type.
     */
    StatusTypeGroup typeGroup() const {
        return m_typeGroup;
    }

private:
    StatusTypeData(StatusType type,
                   const QString &name,
                   const QString &displayName,
                   const QString &iconName,
                   StatusTypeGroup typeGroup);

private:
    friend class StatusTypeManager;

    StatusType m_type;
    QString m_name;
    QString m_displayName;
    QString m_iconName;
    StatusTypeGroup m_typeGroup;
};

#endif // STATUS_TYPE_DATA_H
